import request from '../request'

//微信小程序登陆
export const wxLogin = params => request.globalRequest(`aos/api/wx/login`, 'POST', params, false)

// 退出登录
export const logout = params => request.globalRequest(`aos/sys/logout`, 'POST', params)

//用户详情
export const getUserDetail = params => request.globalRequest(`aos/api/wx/userDetail`, 'GET', params)

//切换角色
export const identitySwitch = params => request.globalRequest(`aos/api/wx/identitySwitch`, 'PUT', params)

//实时快递查询
export const orderTack = params => request.globalRequest(`aos/order/orderTack/${params.params.id}`, 'GET', params)

//医院列表
export const queryHospList = params => request.globalRequest(`aos/hosp/hospList`, 'GET', params)

//医院详情
export const queryhospById = params => request.globalRequest(`aos/hosp/queryById`, 'GET', params)

//科室列表
export const queryKsList = params => request.globalRequest(`aos/sickness/ksList`, 'GET', params)

//疾病分页
export const querySicknessPage = params => request.globalRequest(`aos/sickness/sicknessPage`, 'GET', params)

//疾病详情
export const querySicknessDetail = params => request.globalRequest(`aos/sickness/sicknessDetail/${params.params.id}`, 'GET', params)

//商品列表
export const queryCommodityList = params => request.globalRequest(`aos/commodity/commodityList`, 'GET', params)

//商品详情
export const queryCommodityById = params => request.globalRequest(`aos/commodity/queryById`, 'GET', params)

//获取数据字典
export const queryDictItemsByCode = params => request.globalRequest(`aos/sys/api/queryDictItemsByCode`, 'GET', params)

//添加常用药品
export const addCommonUseCommodity = params => request.globalRequest(`aos/doctor/commonUseCommodity/add`, 'POST', params)

//删除常用药品
export const deleteCommonUseCommodity = params => request.globalRequest(`aos/doctor/commonUseCommodity/delete`, 'DELETE', params)

//常用药品列表
export const queryCommonUseCommodityList = params => request.globalRequest(`aos/doctor/commonUseCommodity/list`, 'GET', params)

//收入
export const getIncomeDetail = params => request.globalRequest(`/aos/client/doctor/incomeDetail`, 'GET', params)

//广告图-全部列表查询
export const queryPageListAll = params => request.globalRequest(`aos/banner/banner/queryPageListAll`, 'GET', params)

//广告图-全部列表查询
export const getProtocol = params => request.globalRequest(`/aos/system/config/getProtocolByType`, 'GET', {
    params: params
})

//协议
export const getProtocolsByType = params => request.globalRequest(`/aos/system/config/getProtocolsByType`, 'GET', {
    params: params
})

// 获取小程序配置信息
export const getMpConfig = params => request.globalRequest(`/aos/system/config/getConfigById`, 'GET', {
	params: {id: 1}
})

// 人脸医生或药师获取token
export const detectAuth = params => request.globalRequest(`/aos/client/doctor/detectAuth`, 'GET', {
	params: params
})

// 人脸医生或药师验证
export const detectAuthResult = params => request.globalRequest(`/aos/client/doctor/detectAuthResult`, 'GET', {
	params: params
})

// 人脸患者获取token
export const patientDetectAuth = params => request.globalRequest(`/aos/client/patient/detectAuth`, 'GET', {
	params: params
})

// 人脸患者验证
export const patientDetectAuthResult = params => request.globalRequest(`/aos/client/patient/detectAuthResult`, 'GET', {
	params: params
})

// 查看身份
export const identity = params => request.globalRequest(`/aos/client/doctor/identity`, 'GET', {
	params: params
})